var User = {
    template: '#user',
    methods: {
         showNumberPowerName(power) {
            return $.Encryption.power.number.powerLab[parseInt(power)].name
        },
        loginOut() {
            $dialog.confirm({
                title: '确定退出么',						
                cancelText: '取消',
                okText: '确定'
            }).then((res) => {
                if(res){
                    $.Encryption.user.LoginOut();
               this.$router.push('/')
                    }
            
            })					
        },
        changePwd() {
            $router.push('/main/pwd')
        },
        
    },
    beforeDestroy() {
        mapCatch.set('#user',{
            saveUser:this.saveUser,
            push:this.push,
            updata:this.updata,
            fitToc:this.fitToc,
            updataUser:this.updataUser,
            catchSize:this.catchSize
        })
    },
    data() {
        return {
            bean: $.Encryption.user.bean,
            saveUser:true,
            push:false,
            updata:true,
            fitToc:false,
            updataUser:true,
            catchSize:50,
            catchMin:5,
            catchMax:300,

        }
    },
    mounted() {
       let userCatch= mapCatch.get('#user')
       if(userCatch&&userCatch.catchSize){
        this.saveUser=userCatch.saveUser
        this.push=userCatch.push
        this.updata=userCatch.updata
        this.fitToc=userCatch.fitToc
        this.updataUser=userCatch.updataUser
        this.catchSize=userCatch.catchSize
       }
    },
    computed: {
       
    },

}